<script setup lang='ts'>
     import {reactive,ref,watch} from 'vue'  

     const count = ref(0)
     const name = ref("123")
     type IPerson = {name:string,info:{address:string,phone:string}}
     const person = reactive<IPerson>({
        name:"掌声",
        info:{
            address:"北京北京",
            phone:"010-12344567"
        }
     })
    //  监听器单个用法
    watch(count,(newValue,olderValue)=>{
        console.log(newValue,olderValue);
    })
    // 监听多个响应式数据newValue和olderValue是数组，顺序按照传入顺序排列
</script>
       
<template>
       
</template>
       
<style scoped>
       
</style>